package com.cn.study007;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName Test7003.java
 * @Description
 * @createTime 2023年05月14日 08:16:00
 */
public class Test7003 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double dis = 0;             //折扣
        double fee = 0;            //收费
        int time = 0;            //时长
        System.out.println("青岛迷你游戏平台>");
        System.out.println(" 游戏币支付\n");
        System.out.println("请选择您玩的游戏类型：");
        System.out.println("\t\t1.牌类");
        System.out.println("\t\t2.休闲竞技类");
        int n = sc.nextInt();
        switch (n) {
            case 1:
                System.out.println("请您输入游戏时长：");
                time = sc.nextInt();
                if (time <= 10) {
                    dis = 0.8;
                    fee = time * 10 * dis;
                } else {
                    dis = 0.5;
                    fee = time * 10 * dis;
                }
                break;
            case 2:
                System.out.println("请您输入游戏时长：");
                time = sc.nextInt();
                if (time <= 10) {
                    dis = 0.8;
                    fee = time * 20 * dis;
                } else {
                    dis = 0.5;
                    fee = time * 20 * dis;
                }
                break;
            default:
                System.out.println("输入错误！");
        }
        System.out.println("您玩的是休闲竞技类游戏，时长是：" + time + "小时"
                + "可以享受" + (int)(dis*10) + "折优惠" + "\n您需要支付" + (int)fee + "个游戏币");


    }
}
